package com.surfacing.rcp.client.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import com.surfacing.rcp.client.view.NavigationView;
import com.surfacing.rcp.client.view.admin.DienststelleAdminView;
import com.surfacing.rcp.client.view.admin.DoctorAdminView;
import com.surfacing.rcp.client.view.admin.EinsatzartAdminView;
import com.surfacing.rcp.client.view.admin.NachforderungAdminView;
import com.surfacing.rcp.client.view.admin.NfsAdminView;
import com.surfacing.rcp.client.view.admin.TransportzielAdminView;

/**
 * The perspective for the administrator
 * 
 * @author Michael
 */
public class AdminPerspective implements IPerspectiveFactory {
	public static final String ID = "com.surfacing.rcp.client.perspectives.admin";

	/**
	 * Set up the layout of the workbench
	 * 
	 * @param layout
	 *            the page layout to use
	 */
	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(true);
		layout.setFixed(true);

		// the main components
		layout.addStandaloneView(NavigationView.ID, false, IPageLayout.TOP,
				0.10f, editorArea);

		// Create a folder on the left
		IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
				0.32f, editorArea);

		left.addView(NfsAdminView.ID);
		left.addView(DoctorAdminView.ID);
		left.addView(DienststelleAdminView.ID);
		left.addView(EinsatzartAdminView.ID);
		left.addView(TransportzielAdminView.ID);
		left.addView(NachforderungAdminView.ID);
	}
}
